package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysUserExtensionMapper;
import com.ruoyi.system.domain.SysUserExtension;
import com.ruoyi.system.service.ISysUserExtensionService;

/**
 * 用户扩展信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
@Service
public class SysUserExtensionServiceImpl implements ISysUserExtensionService 
{
    @Autowired
    private SysUserExtensionMapper sysUserExtensionMapper;

    /**
     * 查询用户扩展信息
     * 
     * @param extensionId 用户扩展信息主键
     * @return 用户扩展信息
     */
    @Override
    public SysUserExtension selectSysUserExtensionByExtensionId(Long extensionId)
    {
        return sysUserExtensionMapper.selectSysUserExtensionByExtensionId(extensionId);
    }

    /**
     * 查询用户扩展信息列表
     * 
     * @param sysUserExtension 用户扩展信息
     * @return 用户扩展信息
     */
    @Override
    public List<SysUserExtension> selectSysUserExtensionList(SysUserExtension sysUserExtension)
    {
        return sysUserExtensionMapper.selectSysUserExtensionList(sysUserExtension);
    }

    /**
     * 新增用户扩展信息
     * 
     * @param sysUserExtension 用户扩展信息
     * @return 结果
     */
    @Override
    public int insertSysUserExtension(SysUserExtension sysUserExtension)
    {
        sysUserExtension.setCreateTime(DateUtils.getNowDate());
        return sysUserExtensionMapper.insertSysUserExtension(sysUserExtension);
    }

    /**
     * 修改用户扩展信息
     * 
     * @param sysUserExtension 用户扩展信息
     * @return 结果
     */
    @Override
    public int updateSysUserExtension(SysUserExtension sysUserExtension)
    {
        sysUserExtension.setUpdateTime(DateUtils.getNowDate());
        return sysUserExtensionMapper.updateSysUserExtension(sysUserExtension);
    }

    /**
     * 批量删除用户扩展信息
     * 
     * @param extensionIds 需要删除的用户扩展信息主键
     * @return 结果
     */
    @Override
    public int deleteSysUserExtensionByExtensionIds(Long[] extensionIds)
    {
        return sysUserExtensionMapper.deleteSysUserExtensionByExtensionIds(extensionIds);
    }

    /**
     * 删除用户扩展信息信息
     * 
     * @param extensionId 用户扩展信息主键
     * @return 结果
     */
    @Override
    public int deleteSysUserExtensionByExtensionId(Long extensionId)
    {
        return sysUserExtensionMapper.deleteSysUserExtensionByExtensionId(extensionId);
    }
}
